<!DOCTYPE html>
<html>
    <head>
        <!-- 页面meta -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>传智健康</title>
        <meta name="description" content="传智健康">
        <meta name="keywords" content="传智健康">
        <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
        <!-- 引入样式 -->
        <link rel="stylesheet" href="../plugins/elementui/index.css">
        <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
        <link rel="stylesheet" href="../css/style.css">
        <!-- 引入组件库 -->
        <script type="text/javascript" src="../js/jquery.min.js"></script>
        <script src="../js/vue.js"></script>
        <script src="../plugins/elementui/index.js"></script>
        <script src="../js/axios-0.18.0.js"></script>
        <style>
            .datatable {
                position: relative;
                box-sizing: border-box;
                -webkit-box-flex: 1;
                width: 100%;
                max-width: 100%;
                font-size: 14px;
                color: rgb(96, 98, 102);
                overflow: hidden;
                flex: 1 1 0%;
            }
            .datatable td, .datatable th {
                padding: 12px 0;
                min-width: 0;
                -webkit-box-sizing: border-box;
                box-sizing: border-box;
                text-overflow: ellipsis;
                vertical-align: middle;
                position: relative;
                text-align: left;
            }
        </style>
    </head>
    <body class="hold-transition">
        <div id="app">
            <div class="content-header">
                <h1>统计分析<small>企业人员情况</small></h1>
                <el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb">
                    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                    <el-breadcrumb-item>统计分析</el-breadcrumb-item>
                    <el-breadcrumb-item>企业人员情况</el-breadcrumb-item>
                </el-breadcrumb>
            </div>
            <div class="app-container">
                <div class="box">
                    <!--<div class="filter-container">-->
                        <!--<el-input placeholder="编码/名称/助记码" v-model="pagination.queryString" style="width: 200px;" class="filter-item" @keyup.enter.native="handleFilter"></el-input>-->
                        <!--<el-button @click="findPage()" class="dalfBut">查询</el-button>-->
                        <!--<el-button type="primary" class="butT" @click="handleCreate()">新建</el-button>-->
                    <!--</div>-->
                    <el-table size="small" current-row-key="id" :data="dataList" stripe highlight-current-row>
                        <el-table-column type="index" align="center" label="序号"></el-table-column>
                        <el-table-column prop="name" label="姓名" align="center"></el-table-column>
                        <el-table-column prop="sex" label="性别" align="center"></el-table-column>
                        <!--<el-table-column label="适用性别" align="center">-->
                            <!--<template slot-scope="scope">-->
                                <!--<span>{{ scope.row.sex == '0' ? '不限' : scope.row.sex == '1' ? '男' : '女'}}</span>-->
                            <!--</template>-->
                        <!--</el-table-column>-->
                        <el-table-column prop="age" label="年龄" align="center"></el-table-column>
                        <el-table-column prop="company" label="所在公司" align="center"></el-table-column>
                        <el-table-column prop="idcard" label="身份证" align="center"></el-table-column>
                        <el-table-column prop="address" label="地址" align="center"></el-table-column>
                        <el-table-column prop="isTouchHubei" label="是否接触湖北人" align="center"></el-table-column>
                        <el-table-column prop="isTouchWenZhou" label="是否接触浙江温州人" align="center"></el-table-column>
                        <el-table-column prop="isHealth" label="是否健康" align="center"></el-table-column>
                        <el-table-column prop="timeOfReturnWork" label="预计返工时间" align="center"></el-table-column>
                        <el-table-column prop="telephone" label="电话" align="center"></el-table-column>
                        </el-table-column>
                    </el-table>
                    <div class="pagination-container">
                        <el-pagination
                            class="pagiantion"
                            @current-change="handleCurrentChange"
                            :current-page="pagination.currentPage"
                            :page-size="pagination.pageSize"
                            layout="total, prev, pager, next, jumper"
                            :total="pagination.total">
                        </el-pagination>
                    </div>
                </div>
            </div>
        </div>
    </body>

    <script>
        var vue = new Vue({
            el: '#app',
            data:{
                pagination: {//分页相关属性
                    currentPage: 1,
                    pageSize:10,
                    total:0,
                    queryString:null,
                },
                dataList: [],//列表数据
                tableData:[],//新增和编辑表单中对应的检查项列表数据
            },
            created() {
                this.findPage();
            },
            methods: {
                //分页查询
                findPage() {
                    //封装分页查询条件
                    var param = {
                        currentPage:this.pagination.currentPage,
                        pageSize:this.pagination.pageSize,
                    };
                    //发送ajax请求，进程分页查询
                    axios.post("/employee/findPage.do",param).then((res) => {
                        this.dataList = res.data.rows;
                        this.pagination.total = res.data.total;
                    });
                },

                //切换页码
                handleCurrentChange(currentPage) {
                    this.pagination.currentPage = currentPage;
                    this.findPage();
                },
            }
        })
    </script>
</html>
